package com.xing.yunji.job.excel;

import com.alibaba.excel.EasyExcel;
import com.google.gson.Gson;
import lombok.extern.slf4j.Slf4j;

import java.util.List;
@Slf4j
public class ImportExcel {
    public static void main(String[] args) {
        simpleRead();
    }

    public static void simpleRead() {

        String fileName = "D:\\Code\\WorkSpace\\planet\\yunji-backend\\src\\main\\resources\\static\\test.xlsx";
        List<TableUserInfo> list = EasyExcel.read(fileName).head(TableUserInfo.class).sheet().doReadSync();
        Gson gson = new Gson();
        for (TableUserInfo data : list) {
            log.info("读取到数据:{}", gson.toJson(data));
        }

    }

}
